export const deepCopy = (obj) => {
  var objClone = Array.isArray(obj) ? [] : {};
  if (obj && typeof obj === 'object') {
    for (var key in obj) {
      if (obj.hasOwnProperty(key) && obj[key] !== undefined) {
        //判断ojb子元素是否为对象，如果是，递归复制
        // if (obj[key].constructor === RegExp) {
        //   objClone[key] = new RegExp(obj[key]);
        // } else
        if (obj[key] && typeof obj[key] === 'object') {
          objClone[key] = deepCopy(obj[key]);
        } else {
          //如果不是，简单复制
          objClone[key] = obj[key];
        }
      }
    }
  }
  return objClone;
};
export const isnullObj = (a) => {
  let len = Object.keys(a);
  return len.length === 0;
};
